/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package assignment_cp3120.viewtickets;

import assignment_cp3120.DAO.Factory.DAOFactory;
import assignment_cp3120.dataObjects.Flight;
import java.sql.Date;
import java.util.Vector;

/**
 * The model for the UCViewTickets use case
 * @author Administrator
 */
public class ViewTicketsModel {
    private Vector<Flight> flights;
    /**
     * Set the flights array list the input
     * @param flights
     * flights array list to be set to this
     */
    public void setFlights(Vector<Flight> flights) {
        this.flights = flights;
    }
    /**
     * Getter for flights AL
     * @return
     * flights array list
     */
    public Vector<Flight> getFlights() {
        return flights;
    }
    /**
     * Used to load the flights array list from the database from the data specified onwards
     * @param date
     * date to load from
     */
    public void loadFlightsFromDate(Date date){
        flights = DAOFactory.getDAOFactory().getFlightDAO().getFlightsFromDate(date);
    }
    
    
}
